<?php

namespace api\controller;

// +----------------------------------------------------------------------
// | 上游任务控制层
// +----------------------------------------------------------------------

use common\controller\VerifyController;
use common\service\UpstreamFileFolderDirectoryService;
use think\Request;

class UpstreamTaskController extends VerifyController
{
    protected $upstreamFileFolderDirectoryService;

    public function __construct()
    {
        parent::__construct();
        $this->upstreamFileFolderDirectoryService = UpstreamFileFolderDirectoryService::getInstance();
    }

    /**
     * 根据task_id 获取上游发布文件信息
     * @param \think\Request $request
     *
     * @return \think\Response
     */
    public function getUpstreamPublishFileByTaskId(Request $request)
    {
        $param = $request->post()['param'];
        $result = $this->upstreamFileFolderDirectoryService->getUpstreamPublishFileByTaskId($param);

        return json(success_response("ok", $result));
    }

}
